package org.itsky.study.test1;

import java.util.function.Consumer;

/**
 * @Author sky
 * @Site cmtianxie163.com 2020/4/10 22:18
 */
public class LambdaTest5 {
    public static void main(String[] args) {
        Consumer<String> con1 = s -> System.out.println(s);
        con1.accept("成名");

        //方法引用

        Consumer<String> con2 = System.out :: println;
        con2.accept("chengming");
    }


}
